package com.sam.algorithm.sha;

import java.util.HashMap;

/**
 * @Author: Sam
 * @Date: 2022-08-12 09:53
 * @Description: 客户端调用 HMAC RSA等加密方式可参考jwt
 */
public class Client {

    public static void main(String[] args) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("appId", "this is source appId");
        map.put("appSecret", "this is source appSecret");
        String sign = SignUtil.generatorSign(map);
        System.out.println("sign = " + sign);

        Boolean notChangeSign = SignUtil.checkSign(map, sign);
        System.out.println("notChangeSign = " + notChangeSign);

        map.put("appId", "this is the changed appId");
        Boolean changeSign = SignUtil.checkSign(map, sign);
        System.out.println("changeSign = " + changeSign);
    }
}
